<div class="fixed-top bg-white border-top border-primary border-2" style="height: 4.75rem;">
    <nav class="container navbar navbar-expand-md navbar-light my-2">
        <button class="btn btn-outline-primary p-0 d-block d-md-none" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExample10" aria-expanded="false" aria-controls="navbarsExample10">
            <i class="bi bi-justify fs-5 mx-2"></i>
        </button>

        <a class="navbar-brand me-0" href="{{ route('home') }}"><span class="text-primary me-1">台湾</span><span class="bg-primary text-white rounded-2 px-2 py-1 fs-6">CMS</span></a>

        <button class="btn btn-outline-primary p-0 d-block d-md-none" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExample11" aria-expanded="false" aria-controls="navbarsExample11">
            <i class="bi bi-person-fill fs-5 mx-2"></i>
        </button>

        <div class="navbar-collapse collapse justify-content-between" data-parent="#NavHeader">
            <ul class="navbar-nav">
                <a class="nav-link px-4" href="{{ route('home') }}">首页</a>
                <a class="nav-link px-4" href="/merchant/">内容管理</a>
                <a class="nav-link px-4" href="/e/DoInfo/AddInfo.php?mid=8&enews=MAddInfo&classid=1">发布</a>
                <a class="nav-link px-4" href="{{ route('auth.buy.group', ['accountType' => $accountType]) }}">VIP升级</a>
            </ul>
        </div>
        <div class="navbar-collapse collapse justify-content-end" data-parent="#NavHeader">
            <ul class="navbar-nav">
            @guest
                @if (Route::has('login'))
                <li class="nav-item me-2"><a class="btn btn-primary btn-sm" href="{{ route('login', ['accountType' => $accountType]) }}" role="button">登陆</a></li>
                @endif

                @if (Route::has('auth.register'))
                <li class="nav-item"><a class="btn btn-outline-primary btn-sm" href="{{ route('auth.register', ['accountType' => $accountType]) }}" role="button">注册</a></li>
                @endif
            @else
                <li class="nav-item dropdown">
                    <a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
                        {{ Auth::user()->name }}
                    </a>

                    <div class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
                        <a class="dropdown-item" href="{{ route('auth.profile', ['accountType' => $accountType]) }}"><i class="bi bi-person-circle me-1"></i>个人资料</a>
                        <a class="dropdown-item" href="{{ route('auth.password.change', ['accountType' => $accountType]) }}"><i class="bi bi-key me-1"></i>修改密码</a>
                        <a class="dropdown-item" href="{{ route('auth.logout', ['accountType' => $accountType]) }}"><i class="bi bi-door-closed me-1"></i>退出</a>
                    </div>
                </li>
            @endguest
            </ul>
        </div>
    </nav>

    <div id="C-MobileNav">
        <div class="container collapse justify-content-between" id="navbarsExample10">
            <ul class="navbar-nav">
                <a class="nav-link text-secondary" href="/"><i class="bi bi-house-fill me-2"></i>首页</a>
                <a class="nav-link text-secondary" href="/merchant/"><i class="bi bi-layout-text-window-reverse me-2"></i>茶馆信息</a>
                <a class="nav-link text-secondary" href="/e/DoInfo/AddInfo.php?mid=8&enews=MAddInfo&classid=1"><i class="bi bi-pencil-square me-2"></i>发布</a>
                <a class="nav-link text-secondary" href="/e/member/buygroup/"><i class="bi bi-gem me-2"></i>VIP升级</a>
            </ul>
            <form class="form mb-4" action="/merchant/c1/">
                <div class="input-group">
                    <input name="keyword" class="form-control" type="search" value="" />
                    <div class="input-group-append G-CursorPointer">
                        <span class="input-group-text" style="background: rgb(102, 51, 102); border: none; color: rgb(255, 255, 255);"><i class="bi bi-search"></i></span>
                    </div>
                </div>
            </form>
        </div>
        <div class="container collapse justify-content-end" id="navbarsExample11">
            <ul class="navbar-nav">
                <a class="nav-link text-secondary" href="{{ route('login', ['accountType' => $accountType]) }}"><i class="bi bi-person-fill me-2"></i>登录</a>
                <a class="nav-link text-secondary" href="{{ route('auth.register', ['accountType' => $accountType]) }}"><i class="bi bi-person-plus-fill me-2"></i>注册</a>
            </ul>
        </div>
    </div>
</div>
